import { requestClient,requestClientBody } from '#/api/request';

/**
 * 列表
 */
export async function getListApi(params: any) {
  let searchParams = new URLSearchParams(params);
  return requestClient.get('/recharge.plan/lists?'+searchParams.toString());
}
  
/**
 * 新增
 */
export async function createApi(data: any) {
  return requestClientBody.post('/recharge.plan/add', {form:data});
}

/**
 * 编辑
 */
export async function editApi(data: any) {
  return requestClientBody.post('/recharge.plan/edit?id='+data.plan_id, {form:data});
}

/**
 * 更新状态
 */
export async function setstatusApi(data: any) {
  return requestClientBody.post('/recharge.plan/setstatus', data);
}

/**
 * 删除
 */
export async function deleteApi(id: number) {
  return requestClientBody.post('/recharge.plan/delete?id='+id);
}

/**
 * 日志
 */
export async function getLogApi(params: any) {
  let searchParams = new URLSearchParams(params);
  return requestClient.get('/recharge.log/lists?'+searchParams.toString());
}

/**
 * 充值方式
 */
export async function getRechargeTypeApi() {
  return requestClient.get('/recharge.log/getRechargeType');
}

/**
 * 支付方式
 */
export async function getPaymentMethodApi() {
  return requestClient.get('/recharge.log/getPaymentMethod');
}

/**
 * 支付状态
 */
export async function getPayStatusApi() {
  return requestClient.get('/recharge.log/getPayStatus');
}